package com.jinmdz.fmis.common.model;

import java.util.ArrayList;

/**
 * Poi.Row
 *
 * @author LiCongLu
 * @date 2020-01-02 14:38
 */
public class PoiRow implements Comparable<PoiRow> {
    /**
     * 行数
     */
    private int rowNum;

    /**
     * 行数据
     */
    private ArrayList<PoiCell> cells;

    public int getRowNum() {
        return rowNum;
    }

    public PoiRow setRowNum(int rowNum) {
        this.rowNum = rowNum;
        return this;
    }

    public ArrayList<PoiCell> getCells() {
        return cells;
    }

    public PoiRow setCells(ArrayList<PoiCell> cells) {
        this.cells = cells;
        return this;
    }

    @Override
    public int compareTo(PoiRow o) {
        if (o == null) {
            return 1;
        }
        if (this.rowNum == o.rowNum) {
            return 0;
        }
        return this.rowNum > o.rowNum ? 1 : -1;
    }
}
